package com.qiantu.api.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

public class LLPwdUtil {
    /**
     * 6~32位可以是大小写字母，数字和特殊字符
     * @param pwd
     * @return
     * @throws PatternSyntaxException
     */
    public static boolean checkPwd(String pwd)
            throws PatternSyntaxException {
        String regExp = "^[0-9A-Za-z\\W]{6,32}$";
        Pattern p = Pattern.compile(regExp);
        Matcher m = p.matcher(pwd);
        return m.matches();
    }
}
